class MigrateToLocalizedRegionDesc < ActiveRecord::Migration
  def self.up
    Region.find(:all).each do |region|
      RegionDescription.create :region => region, :description => region.description, :language => 'English'
    end
    
    remove_column :regions, :description
  end

  def self.down
    add_column :regions, :description, :text
    
    RegionDescription.find(:all, :conditions => {:language => "English"}).each do |desc|
      desc.region.description = desc.description
      desc.region.save!
    end
    
    # Little sketchy here, but eh
    RegionDescription.delete_all
  end
end
